package borge.web.teamspirit.client.data;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import borge.web.teamspirit.client.interfaces.PersistentData;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
public class MatchPlayerStats implements PersistentData {

	/* Encoded key generated by GAE when first saved.
	 * Guaranteed to be unique and contains mapping to 
	 * a team using gae.pk-name key defined below. */
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    private String iEncodedKey;
	
	@Persistent
	private String iMatchKey;
	
	@Persistent 
	private String iPlayerKey;
	
	@Persistent
	private Integer iGoals;
	
	@Persistent
	private Integer iAssists;
	
	@Persistent
	private Boolean iYellowCard;
	
	@Persistent
	private Boolean iRedCard;
	
	public MatchPlayerStats(){
		
	}

	public void setMatchKey(String aKey){
		iMatchKey = aKey;
	}
	
	public String getMatchKey(){
		return iMatchKey;
	}
	
	public void setPlayerKey(String aPlayerKey) {
		this.iPlayerKey = aPlayerKey;
	}

	public String getPlayerKey() {
		return iPlayerKey;
	}

	public void setGoals(Integer aGoals) {
		this.iGoals = aGoals;
	}

	public Integer getGoals() {
		return iGoals;
	}

	public void setAssists(Integer aAssists) {
		this.iAssists = aAssists;
	}

	public Integer getAssists() {
		return iAssists;
	}

	public void setYellowCard(Boolean aYellowCard) {
		this.iYellowCard = aYellowCard;
	}

	public Boolean getYellowCard() {
		return iYellowCard;
	}

	public void setRedCard(Boolean aRedCard) {
		this.iRedCard = aRedCard;
	}

	public Boolean getRedCard() {
		return iRedCard;
	}

	@Override
	public String getDisplayingWidget() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getEncodedKey() {
		// TODO Auto-generated method stub
		return iEncodedKey;
	}

	
}
